import java.util.Arrays;

public interface InterDemo {
    public static void main(String[] args) {
        String str = "1.2.3.4";
        String[] split = str.split("\\.");
        System.out.println(split.length);        // 1
        System.out.println(Arrays.asList(split));//2
        String s = str.replace(".", ",");
        System.out.println(s);
        s = str.replaceAll(".", ",");
        System.out.println(s);

    }
}
